<template>
  <div class="home-container">
        
    <NavHeader />
    
    <!-- 轮播图区域 -->
    <div class="carousel-section">
      <PolicyCarousel />
    </div>
    
    <!-- 顶部 banner 区域 -->
    <div class="banner">
      <div class="banner-content">
        <h1 class="banner-title">便捷挂号，轻松就医</h1>
        <p class="banner-desc">告别排队等待，随时随地在线预约专家号，享受优质医疗服务</p>
        <div class="banner-btns">
          <button class="btn primary-btn">立即预约</button>
          <button class="btn secondary-btn">了解更多</button>
        </div>
      </div>
    </div>

    <!-- 步骤说明区域 -->
    <div class="steps-section">
      <h2 class="steps-title">简单四步，完成挂号</h2>
      <p class="steps-desc">我们简化了挂号流程，只需四个简单步骤，即可完成预约，节省您的宝贵时间</p>
      <div class="steps-list">
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
              <path d="M16 6l2-2 5 5"></path>
              <path d="M2 6l2-2 5 5"></path>
            </svg>
          </div>
          <h3 class="step-title">选择科室</h3>
          <p class="step-desc">根据您的症状或需求，选择合适的科室和专科</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <rect x="3" y="4" width="18" height="16" rx="2" ry="2"></rect>
              <line x1="16" y1="8" x2="8" y2="8"></line>
              <line x1="16" y1="16" x2="8" y2="16"></line>
            </svg>
          </div>
          <h3 class="step-title">选择日期</h3>
          <p class="step-desc">查看医生排班，选择您方便的就诊日期和时间段</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M12 14l9-5-9-5-9 5 9 5"></path>
              <path d="M12 14l6.16-3.422a12.083 12.083 0 0 1 .665 6.479A11.952 11.952 0 0 0 12 20.055a11.952 11.952 0 0 0-6.824-2.998 12.078 12.078 0 0 1 .665-6.479L12 14z"></path>
              <path d="M12 14l9-5-9-5-9 5 9 5" opacity=".2"></path>
            </svg>
          </div>
          <h3 class="step-title">填写信息</h3>
          <p class="step-desc">填写就诊人信息，确认预约详情</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
              <polyline points="22 4 12 14.01 9 11.01"></polyline>
            </svg>
          </div>
          <h3 class="step-title">完成预约</h3>
          <p class="step-desc">支付挂号费用，获取预约凭证，按时就诊</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
// 可在此处添加与后端交互、数据请求等逻辑，当前简单示例未涉及复杂交互
import NavHeader from '../components/NavHeader.vue';
import PolicyCarousel from '../components/PolicyCarousel.vue';
</script>

<style scoped>
/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.home-container {
  width: 100%;
  overflow: hidden;
}

/* Banner区域样式 */
.banner {
  width: 100vw;
  background: #6699ff;
  color: #fff;
  padding: 80px 0;
  position: relative;
}

.banner-content {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.banner-title {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.banner-desc {
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 700px;
}

.banner-btns {
  display: flex;
  gap: 25px;
}

.btn {
  padding: 14px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
}

.primary-btn {
  background-color: #fff;
  color: #6699ff;
}

.primary-btn:hover {
  background-color: #e6f0ff;
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* 步骤区域样式 */
.steps-section {
  width: 100vw;
  margin: 0;
  padding: 80px 0;
  text-align: center;
  background-color: #f5f7fa;
}

.steps-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.steps-desc {
  font-size: 16px;
  color: #666;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 0 40px;
}

.step-item {
  background-color: #fff;
  border: none;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.step-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  color: #6699ff;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  text-align: center;
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .steps-list {
    padding: 0 20px;
    gap: 25px;
  }
  
  .step-item {
    padding: 30px;
  }
}

@media (max-width: 992px) {
  .steps-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .banner-title {
    font-size: 36px;
  }
  
  .banner-desc {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .steps-list {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }
  
  .banner {
    padding: 60px 0;
  }
  
  .banner-title {
    font-size: 28px;
  }
  
  .banner-desc {
    font-size: 14px;
    margin-bottom: 30px;
  }
  
  .banner-btns {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .steps-section {
    padding: 60px 0;
  }
  
  .steps-title {
    font-size: 24px;
  }
  
  .steps-desc {
    font-size: 14px;
    margin-bottom: 40px;
  }
  
  .step-item {
    padding: 25px;
  }
}

/* 轮播图区域样式 */
.carousel-section {
  width: 100vw;
  padding: 40px 0;
  background-color: #f8f9fa;
}
</style>